<!DOCTYPE html>
<html lang="en">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .w100 {
            width: 100%;
        }

        .flex {
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            -webkit-box-align: center;
            -ms-flex-align: center;
            align-items: center;
        }

        .wrap {
            flex-wrap: wrap;
        }

        .flex-1 {
            flex: 1;
            -webkit-box-flex: 1;
            -ms-flex: 1;
            width: 0;
        }

        .justify-center {
            -webkit-box-pack: center;
            -moz-justify-content: center;
            -webkit-justify-content: center;
            justify-content: center;
        }

        .justify-between {
            -webkit-box-pack: space-between;
            -moz-justify-content: space-between;
            -webkit-justify-content: space-between;
            justify-content: space-between;
        }

        .mr10 {
            margin-right: 10px;
        }

        .mt10 {
            margin-top: 10px;
        }

        .mb10 {
            margin-bottom: 10px;
        }

        .ml10 {
            margin-left: 10px;
        }

        .mb20 {
            margin-bottom: 20px;
        }

        .clearfix::after,
        .clearfix::before {
            content: '';
            display: table;
            clear: both;
        }
        .content2 {
            page-break-before: always;
        }
        .title {
            font-size: 24px;
            font-weight: 600;
        }

        .info .item:first-child {
            width: 40%;
        }

        .exam .item {
            width: 30%;
        }

        .exam .item span {
            width: 50%;
            display: inline-block;
            border-bottom: 1px solid #000;
        }

        .table-in thead {

        }

        .table-in tbody tr td {
           text-align: center;
        }
        tr {
            page-break-before: always;
            page-break-after: always;
            page-break-inside: avoid;
        }
        thead {
            display: table-row-group;// 使用thead默认每页都显示表头
        }
    </style>
</head>

<body>
    <div class="container clearfix" th:each='candidateList:${candidateLists}'>
        <div class="title flex justify-center mt10 mb20"><span th:text='${taskName}'></span>签到表</div>
        <div class="info flex  mb10">
            <div class="item">考场：<span th:text='${roomName}'></span></div>
            <div class="item flex-1">考试时间：<span  th:text='${timeRange}'></span></div>
        </div>
        <div class="exam flex  mb10">
            <div class="item">主监考：<span></span></div>
            <div class="item">副监考：<span></span></div>
            <div class="item">实考人数：<span></span></div>
        </div>

        <div class="table-container w100" >
            <table class="table-in w100" border="1" cellpadding='0' cellspacing="0">
                <thead>
                    <tr>
                        <th>座位号</th>
                        <th>准考证号</th>
                        <th>考生姓名</th>
                        <th>科目名称</th>
                        <th>电子设备是否已关闭</th>
                        <th>考生签名</th>
                    </tr>
                </thead>
                <tbody>
                    <tr th:each='candidate:${candidateList}'>
                        <td><span th:text='${candidate.seat}'></span></td>
                        <td><span th:text='${candidate.admission}'></span></td>
                        <td><span th:text='${candidate.name}'></span></td>
                        <td><span th:text='${candidate.subject}'></span></td>
                        <td></td>
                        <td></td>
                    </tr>
                </tbody>

            </table>
            <div class="content2"></div>
        </div>
    </div>
</body>

</html>